fish: update to 4.0.2
authorShin Rag <[email protected]>
Fri, 22 Aug 2025 13:25:52 +0000 (21:25 +0800)
committerHannu Nyman <[email protected]>
Sat, 23 Aug 2025 10:31:00 +0000 (13:31 +0300)
Update fish to 4.0.2

Signed-off-by: Shin Rag <[email protected]>
utils/fish/Makefile

index f9a16135ac0e7dfacdd3d553ef0b4eeabe9dd62b..6aa4397ea2e1eb2228b0b6fe76d1912bc78cc0e0 100644 (file)
@@ -5,27 +5,39 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fish
-PKG_VERSION:=3.7.1
+PKG_VERSION:=4.0.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
-PKG_HASH:=614c9f5643cd0799df391395fa6bbc3649427bb839722ce3b114d3bbc1a3b250
+PKG_HASH:=6e1ecdb164285fc057b2f35acbdc20815c1623099e7bb47bbfc011120adf7e83
 
 PKG_MAINTAINER:=Curtis Jiang <[email protected]>, Hao Dong <[email protected]>
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:fishshell:fish
 
+PKG_BUILD_DEPENDS:=rust/host pcre2
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
+include ../../lang/rust/rust-values.mk
+
+# Disable static linking for pcre2-sys
+export PCRE2_SYS_STATIC=0
+
+# For pcre2-sys
+export CC=$(TARGET_CC)
+export RUSTFLAGS+=-C target-feature=-crt-static
+export CARGO_TARGET_$(shell echo $(RUSTC_TARGET_ARCH) | sed -e 'y/abcdefghijklmnopqrstuvwxyz-/ABCDEFGHIJKLMNOPQRSTUVWXYZ_/')_LINKER:=$(TARGET_CC)
 
 define Package/fish
   SECTION:=utils
   CATEGORY:=Utilities
   SUBMENU:=Shells
   TITLE:=A smart and user-friendly command line shell
-  DEPENDS:=+libncurses +libstdcpp +libatomic +libpcre2-32
+  DEPENDS:=$(RUST_ARCH_DEPENDS) +libpcre2 +libpcre2-32
   URL:=https://fishshell.com
 endef
 
@@ -37,14 +49,24 @@ define Package/fish/description
 endef
 
 CMAKE_OPTIONS += \
-       -DBUILD_DOCS=FALSE \
-       -DWITH_GETTEXT=FALSE
+       -DBUILD_DOCS=OFF \
+       -DWITH_GETTEXT=OFF \
+       -DRust_CARGO_TARGET=$(RUSTC_TARGET_ARCH) \
+       -DFISH_USE_SYSTEM_PCRE2=ON
+
+define Package/fish/conffiles
+/usr/etc/fish/config.fish
+endef
 
 define Package/fish/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_indent $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish_key_reader $(1)/usr/bin
+
+       $(INSTALL_DIR) $(1)/usr/etc/fish
+       $(CP) $(PKG_INSTALL_DIR)/usr/etc/fish/* $(1)/usr/etc/fish/
+
        $(INSTALL_DIR) $(1)/usr/share/fish
        $(CP) $(PKG_INSTALL_DIR)/usr/share/fish/* $(1)/usr/share/fish/
        rm -rf $(1)/usr/share/fish/groff